package hasthi.metamodel;

import hasthi.common.HasthiException;
import hasthi.metamodel.resource.ManagedResource;

import java.util.Collection;

import javax.xml.namespace.QName;

public interface ResourceModel {
    /**
     * Get all resource availible to the resource model. This return all local and remote resources
     * @return
     * @throws HasthiException
     */
    public ManagedResource[] getAllResources() throws HasthiException;
    /**
     * Get a resource, if it is a remote resource, what is returned is a stub
     * @param name
     * @return
     * @throws HasthiException
     */
    public abstract ManagedResource getResource(QName name) throws HasthiException;
    /**
     * return All local resources
     * @return
     */
    public abstract Collection<QName> getResources();
    
    /**
     * try to find the coordination URL new and recover
     * @throws HasthiException
     */
    public void reload() throws HasthiException,InterruptedException;
    
    //public void removeResource(QName name);
}
